
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)

project(intro LANGUAGES C)

include_directories(../common)

set(COMPILE_ALL OFF)

list(APPEND _sources
    ../common/error.c
    ../common/pathalloc.c
)

if (COMPILE_ALL)
add_executable(hello1 01_hello1.c ${_sources})
add_executable(doatexit 02_doatexit.c ${_sources})
add_executable(echoarg 03_echoarg.c ${_sources})
# add_executable(cmd2 05_cmd2.c ${_sources})
else()
add_executable(getrlimit 06_getrlimit.c ${_sources})
endif()
